package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.mapper.entity.Clothing;
import com.example.demo.mapper.entity.SysUser;
import com.example.demo.mapper.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface UserCommonMapper extends BaseMapper<SysUser> {

    @Select("SELECT * FROM sys_user WHERE user_id = #{userId}")
    SysUser selectUserById(int userId);

    @Update("UPDATE sys_user "+
            "SET avatar = #{avatar} "+
            "WHERE user_id = #{userId} ")
    void placeAvatar(SysUser currentUser);

}
